<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1 {
        background-color: pink;
        width: 500px;
        height: 1200px;
      }
      .box2 {
        background-color: skyblue;
        width: 500px;
        height: 300px;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="box1"></div>
      <div class="box2">121212</div>
    </div>
    <script>
      const box2 = document.querySelector('.box2')
      document.querySelector('.box').removeChild(box2)
      console.log(box2)
    </script>
  </body>
</html>
